#!/bin/bash
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin

arg1=$1
arg2=$2


update_project_and_restart()
{
	echo "Restarting..."
	cd /Server/www/tangzk/Dan
	git pull
	npm run stop
	npm run start
	echo "Done..."
}

case "${arg1}" in
    restart)
        update_project_and_restart
        ;;
    *)
        echo "Usage: pi restart"
        ;;
esac
exit
